﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DiduanModify.aspx.cs" Inherits="Admin.SysConfig.DiduanModify" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>修改地段</title>
    <script src="/admin/Scripts/Check.js?FileVersion=<%=FileVersion %>" type="text/javascript"></script>
    <link href="/Admin/Css/rightbar.css?FileVersion=<%=FileVersion %>" rel="stylesheet"
        type="text/css" />
    <script src="/Admin/Scripts/jquery-1.4.1.min.js?FileVersion=<%=FileVersion %>" type="text/javascript"></script>
</head>
<body id="wallet">
    <div class="warp">
        <div class="topnav">
            <ul>
                <li><a href="DiduanList.aspx"><span>地段管理</span></a></li>
                <li><a href="javascript:void(0);" style="cursor: default;" class="on_nav"><span>地段修改</span></a></li>
            </ul>
        </div>
        <div class="tab mt15">
            <ul>
                <li class="in_on"><strong>地段修改</strong></li>
                <li class="caution01">带 <span class="org">*</span> 号为必填项目</li>
            </ul>
        </div>
        <div class="cont" style="padding-top: 8px;" id="stb8">
            <form name="form1" method="post" action="DiduanModify.aspx?action=modify" id="form1">
            <input type="hidden" id="id" name="id" value="<%=id %>" />
            <table width="660" border="0" cellspacing="0" cellpadding="0" class="tb01">
                <tr>
                    <td align="right" valign="middle" bgcolor="#F9F9F9">
                        <span class="org">*</span>地段代码：
                    </td>
                    <td align="left" valign="top">
                        <input type="text" id="txtCode" name="txtCode" class="input200_out" style="width: 240px;"
                            maxlength="25" need="地段代码不能为空" int="地段代码只能为数字" value="<%=de.Code %>" /><span class="gray pl10">请输入地段代码，数字</span>
                    </td>
                </tr>
                <tr>
                    <td align="right" valign="middle" bgcolor="#F9F9F9">
                        <span class="org">*</span>地段名称：
                    </td>
                    <td align="left" valign="top">
                        <input type="text" id="txtName" name="txtName" class="input200_out" style="width: 240px;"
                            need="请输入地段名称" value="<%=de.Name %>" /><span class="gray pl10">请输入地段名称名称</span>
                    </td>
                </tr>
               <%-- <tr>
                    <td align="right" valign="middle" bgcolor="#F9F9F9">
                        <span class="org">*</span>所属乡镇：
                    </td>
                    <td align="left" valign="middle">
                        <select name="selXiangzhen" id="selXiangzhen" style="width: 250px;">
                            <option value="">请选择所属乡镇</option>
                            <%=OutputSelectOptions(dtXiangzhen, "name", "id", de.XiangzhenID.ToString())%>
                        </select><span class="gray pl10">请选择所属乡镇</span>
                    </td>
                </tr>
                <tr>
                    <td align="right" valign="middle" bgcolor="#F9F9F9">
                        <span class="org">*</span>所属街道：
                    </td>
                    <td align="left" valign="middle">
                        <select name="selJiedao" id="selJiedao" style="width: 250px;">
                            <%=OutputSelectOptions(dtJiedao, "name", "id", de.JiedaoID.ToString())%>
                            <option value="">请选择所属街道</option>
                        </select><span class="gray pl10">请选择所属街道</span>
                    </td>
                </tr>--%>
                <tr>
                    <td align="right" valign="middle" bgcolor="#F9F9F9">
                        单位税额：
                    </td>
                    <td align="left" valign="top">
                        <input type="text" id="txtPerTax" name="txtPerTax" class="input200_out" style="width: 240px;"
                            maxlength="50" float="单位税额只能为数字" value="<%=de.PerTax %>" /><span class="gray pl10">请输入单位税额</span>
                    </td>
                </tr>
                <tr>
                    <td align="right" valign="middle" bgcolor="#F9F9F9">
                        最低租金：
                    </td>
                    <td align="left" valign="top">
                        <input type="text" id="txtMinPrice" name="txtMinPrice" class="input200_out" style="width: 240px;"
                            maxlength="50" float="最低租金只能为数字" value="<%=de.MinPrice %>" /><span class="gray pl10">请输入最低租金</span>
                    </td>
                </tr>
            </table>
            </form>
        </div>
        <div class="btudiv">
            <ul style="width: 180px;">
                <li>
                    <input name="Submit1" type="submit" id="Submit1" class="button_sure" onclick="return CheckForm()"
                        value="确认修改" /></li>
            </ul>
        </div>
    </div>
    <script type="text/javascript">
        //初始化
        jQuery(function ($) {
            $("#selXiangzhen").change(function () {
                GetJiedaoList();
            });
        });
        //获取街道列表
        function GetJiedaoList() {
            var xianzhenID = $("#selXiangzhen").val();
            var url = "/Admin/AjaxPage/DiduanConfig.aspx?action=getjiedaolist&xianzhenID=" + xianzhenID + "&timestamp=" + (new Date()).getTime();
            $.ajax({
                url: url,
                success: function (data) {
                    $("#selJiedao").empty();
                    $("<option value=''>请选择所属街道</option>").appendTo($("#selJiedao"));
                    $(data).appendTo($("#selJiedao"));
                },
                error: function (data) {
                    alert("获取街道信息失败，请刷新页面重试!");
                }
            });
        }

        function CheckForm() {
            var obj = document.form1.elements;
            if (!checkAttr(obj)) {
                return false;
            }
            if ($("#selXiangzhen").val() == "") {
                alert("地段所属乡镇不能为空");
                return false;
            }
            if ($("#selJiedao").val() == "") {
                alert("地段所属街道不能为空");
                return false;
            }
            $("#form1").submit();
            return true;
        }
    </script>
</body>
</html>
